
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/tools";

export function PaperPageList(query) {
  return request({
    url: '/api/admin/exam/paper/findPageList',
    method: 'post',
    params: query
  })
}

export function PaperTaskExamPage(query) {
  return request({
    url: '/api/admin/exam/paper/taskExamPage',
    method: 'post',
    params: query
  })
}

export function PaperEdit(query) {
  return request({
    url: '/api/admin/exam/paper/saveOrEdit',
    method: 'post',
    data: query
  })
}

export function PaperSelect(id) {
  return request({
    url: '/api/admin/exam/paper/findById',
    method: 'post',
    data:{id:id}
  })
}
export function PaperDeletePaper(id) {
  return request({
    url: '/api/admin/exam/paper/delete/' + id,
    method: 'post',
  })
}

export function PaperSelectByExamId(id) {
  return request({
    url: '/api/admin/exam/paper/findByExamId',
    method: 'post',
    data:{examMngId:id}
  })
}

/**
 * 自动生成试卷
 * @param query
 * @returns {*}
 */
export function generatePaper(query) {
  return request({
    url: '/api/admin/exam/paper/generatePaper',
    method: 'post',
    data: query
  })
}
